package cn.lupin.controller;

import cn.lupin.service.ReportService;
import cn.lupin.utils.PagedResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/report")
public class ReportController {

    @Autowired
    private ReportService reportService;

    @PostMapping("/reportList")
    @ResponseBody
    public PagedResult reportList(Integer page) {
        return reportService.queryReportList(page, 10);
    }

    @GetMapping("/showReportList")
    public String showReportList() {
        return "report/reportList";
    }
}
